<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: index.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>

<div class="vote_main_page">
  <h1><?php echo $this->translate("Welcome to Votings of %s", $this->layout()->siteinfo['title']); ?></h1>

  <div class="vote_types">
    
    <div class="photo-type vote-type">
      <div class="stock">
        <?php echo $this->htmlLink($this->url(array('controller' => 'photo'), 'vote_general'), $this->htmlImage($this->baseUrl() . "/application/modules/Vote/externals/images/photo.png") ); ?>
      </div>
      <div class="clr"></div>
      <div class="title">
        <?php echo $this->htmlLink($this->url(array('controller' => 'photo'), 'vote_general'), $this->translate('vote_type_photo_title') . $this->htmlImage( $this->baseUrl() . '/application/modules/Kowcore/externals/images/launch.gif')); ?>
      </div>
      <div class="clr"></div>
      <?php if ($this->translate('vote_type_photo_description')): ?>
      <div class="description">
        <?php echo $this->translate('vote_type_photo_description'); ?>
      </div>
      <?php endif; ?>
      <div class="clr"></div>
      <div class="items">
        <div class="title"><?php echo $this->translate('vote_type_Latest Votings'); ?></div>
        <div class="list">
          <?php if ($this->photoVotings->getTotalItemCount()): ?>
          <?php foreach($this->photoVotings as $item): ?>
            <div class="item">
              <div class="photo">
                <?php echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.normal')); ?>
              </div>
              <div class="info">
                <?php echo $this->htmlLink($item->getHref(), $item->getTitle()); ?>
              </div>
            </div>
            <div class="clr"></div>
          <?php endforeach; ?>
          <?php else: ?>
            <div class="tip">
              <span>
                <?php echo $this->translate('Nobody has created a photo voting yet.');?>
              </span>
            </div>
          <?php endif; ?>
          <div class="clr"></div>
        </div>
      </div>
    </div>

    <div class="video-type vote-type">
      <div class="stock">
        <?php echo $this->htmlLink($this->url(array('controller' => 'video'), 'vote_general'), $this->htmlImage($this->baseUrl() . "/application/modules/Vote/externals/images/video.png") ); ?>
      </div>
      <div class="title">
        <?php echo $this->htmlLink($this->url(array('controller' => 'video'), 'vote_general'), $this->translate('vote_type_video_title') . $this->htmlImage( $this->baseUrl() . '/application/modules/Kowcore/externals/images/launch.gif')); ?>
      </div>
      <div class="clr"></div>
      <?php if ($this->translate('vote_type_video_description')): ?>
      <div class="description">
        <?php echo $this->translate('vote_type_video_description'); ?>
      </div>
      <?php endif; ?>
      <div class="clr"></div>
      <div class="items">
        <div class="title"><?php echo $this->translate('vote_type_Latest Votings'); ?></div>
        <div class="list">
          <?php if ($this->videoVotings->getTotalItemCount()): ?>
          <?php foreach($this->videoVotings as $item): ?>
            <div class="item">
              <div class="photo">
                <?php echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.normal')); ?>
              </div>
              <div class="info">
                <?php echo $this->htmlLink($item->getHref(), $item->getTitle()); ?>
              </div>
            </div>
            <div class="clr"></div>
          <?php endforeach; ?>
          <?php else: ?>
            <div class="tip">
              <span>
                <?php echo $this->translate('Nobody has created a video voting yet.');?>
              </span>
            </div>
          <?php endif; ?>
          <div class="clr"></div>
        </div>
      </div>
    </div>

    <div class="music-type vote-type">
      <div class="stock">
        <?php echo $this->htmlLink($this->url(array('controller' => 'music'), 'vote_general'), $this->htmlImage($this->baseUrl() . "/application/modules/Vote/externals/images/music.png") ); ?>
      </div>
      <div class="title">
        <?php echo $this->htmlLink($this->url(array('controller' => 'music'), 'vote_general'), $this->translate('vote_type_music_title') . $this->htmlImage( $this->baseUrl() . '/application/modules/Kowcore/externals/images/launch.gif')); ?>
      </div>
      <div class="clr"></div>
      <?php if ($this->translate('vote_type_music_description')): ?>
      <div class="description">
        <?php echo $this->translate('vote_type_music_description'); ?>
      </div>
      <?php endif; ?>
      <div class="clr"></div>
      <div class="items">
        <div class="title"><?php echo $this->translate('vote_type_Latest Votings'); ?></div>
        <div class="list">
          <?php if ($this->musicVotings->getTotalItemCount()): ?>
          <?php foreach($this->musicVotings as $item): ?>
            <div class="item">
              <div class="photo">
                <?php echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.normal')); ?>
              </div>
              <div class="info">
                <?php echo $this->htmlLink($item->getHref(), $item->getTitle()); ?>
              </div>
            </div>
            <div class="clr"></div>
          <?php endforeach; ?>
          <?php else: ?>
            <div class="tip">
              <span>
                <?php echo $this->translate('Nobody has created a music voting yet.');?>
              </span>
            </div>
          <?php endif; ?>
          <div class="clr"></div>
        </div>
      </div>
    </div>

    <div class="clr"></div>
  </div>
  <div class="clr"></div>
  
</div>